Optimal. Leaf size=99 \[ \frac {x}{a^3}-\frac {13 \tanh ^{-1}(\sin (c+d x))}{8 a^3 d}-\frac {\tan (c+d x)}{a^3 d}+\frac {11 \sec (c+d x) \tan (c+d x)}{8 a^3 d}+\frac {\sec ^3(c+d x) \tan (c+d x)}{4 a^3 d}-\frac {\tan ^3(c+d x)}{a^3 d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.15, antiderivative size = 99, normalized size of antiderivative = 1.00, number of steps
used = 12, number of rules used = 9, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.429, Rules used = {3973, 3971,
3554, 8, 2691, 3855, 2687, 30, 3853} \begin {gather*} -\frac {\tan ^3(c+d x)}{a^3 d}-\frac {\tan (c+d x)}{a^3 d}-\frac {13 \tanh ^{-1}(\sin (c+d x))}{8 a^3 d}+\frac {\tan (c+d x) \sec ^3(c+d x)}{4 a^3 d}+\frac {11 \tan (c+d x) \sec (c+d x)}{8 a^3 d}+\frac {x}{a^3} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 30
Rule 2687
Rule 2691
Rule 3554
Rule 3853
Rule 3855
Rule 3971
Rule 3973
Rubi steps
\begin {align*} \int \frac {\tan ^8(c+d x)}{(a+a \sec (c+d x))^3} \, dx &=\frac {\int (-a+a \sec (c+d x))^3 \tan ^2(c+d x) \, dx}{a^6}\\ &=\frac {\int \left (-a^3 \tan ^2(c+d x)+3 a^3 \sec (c+d x) \tan ^2(c+d x)-3 a^3 \sec ^2(c+d x) \tan ^2(c+d x)+a^3 \sec ^3(c+d x) \tan ^2(c+d x)\right ) \, dx}{a^6}\\ &=-\frac {\int \tan ^2(c+d x) \, dx}{a^3}+\frac {\int \sec ^3(c+d x) \tan ^2(c+d x) \, dx}{a^3}+\frac {3 \int \sec (c+d x) \tan ^2(c+d x) \, dx}{a^3}-\frac {3 \int \sec ^2(c+d x) \tan ^2(c+d x) \, dx}{a^3}\\ &=-\frac {\tan (c+d x)}{a^3 d}+\frac {3 \sec (c+d x) \tan (c+d x)}{2 a^3 d}+\frac {\sec ^3(c+d x) \tan (c+d x)}{4 a^3 d}-\frac {\int \sec ^3(c+d x) \, dx}{4 a^3}+\frac {\int 1 \, dx}{a^3}-\frac {3 \int \sec (c+d x) \, dx}{2 a^3}-\frac {3 \text {Subst}\left (\int x^2 \, dx,x,\tan (c+d x)\right )}{a^3 d}\\ &=\frac {x}{a^3}-\frac {3 \tanh ^{-1}(\sin (c+d x))}{2 a^3 d}-\frac {\tan (c+d x)}{a^3 d}+\frac {11 \sec (c+d x) \tan (c+d x)}{8 a^3 d}+\frac {\sec ^3(c+d x) \tan (c+d x)}{4 a^3 d}-\frac {\tan ^3(c+d x)}{a^3 d}-\frac {\int \sec (c+d x) \, dx}{8 a^3}\\ &=\frac {x}{a^3}-\frac {13 \tanh ^{-1}(\sin (c+d x))}{8 a^3 d}-\frac {\tan (c+d x)}{a^3 d}+\frac {11 \sec (c+d x) \tan (c+d x)}{8 a^3 d}+\frac {\sec ^3(c+d x) \tan (c+d x)}{4 a^3 d}-\frac {\tan ^3(c+d x)}{a^3 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] Leaf count is larger than twice the leaf count of optimal. \(230\) vs. \(2(99)=198\).
time = 0.81, size = 230, normalized size = 2.32 \begin {gather*} \frac {\sec ^4(c+d x) \left (24 d x+39 \log \left (\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right )+4 \cos (2 (c+d x)) \left (8 d x+13 \log \left (\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right )-13 \log \left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )\right )+\cos (4 (c+d x)) \left (8 d x+13 \log \left (\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right )-13 \log \left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )\right )-39 \log \left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )+38 \sin (c+d x)-32 \sin (2 (c+d x))+22 \sin (3 (c+d x))\right )}{64 a^3 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.12, size = 170, normalized size = 1.72
method | result | size |
risch | \(\frac {x}{a^{3}}-\frac {i \left (11 \,{\mathrm e}^{7 i \left (d x +c \right )}-16 \,{\mathrm e}^{6 i \left (d x +c \right )}+19 \,{\mathrm e}^{5 i \left (d x +c \right )}-19 \,{\mathrm e}^{3 i \left (d x +c \right )}+16 \,{\mathrm e}^{2 i \left (d x +c \right )}-11 \,{\mathrm e}^{i \left (d x +c \right )}\right )}{4 d \,a^{3} \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{4}}-\frac {13 \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )}{8 a^{3} d}+\frac {13 \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right )}{8 a^{3} d}\) | \(138\) |
derivativedivides | \(\frac {2 \arctan \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\frac {1}{4 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{4}}+\frac {3}{2 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{3}}+\frac {27}{8 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{2}}+\frac {21}{8 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}+\frac {13 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{8}-\frac {1}{4 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{4}}+\frac {3}{2 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{3}}-\frac {27}{8 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{2}}+\frac {21}{8 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}-\frac {13 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{8}}{a^{3} d}\) | \(170\) |
default | \(\frac {2 \arctan \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\frac {1}{4 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{4}}+\frac {3}{2 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{3}}+\frac {27}{8 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{2}}+\frac {21}{8 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}+\frac {13 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{8}-\frac {1}{4 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{4}}+\frac {3}{2 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{3}}-\frac {27}{8 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{2}}+\frac {21}{8 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}-\frac {13 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{8}}{a^{3} d}\) | \(170\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 257 vs.
\(2 (93) = 186\).
time = 0.48, size = 257, normalized size = 2.60 \begin {gather*} \frac {\frac {2 \, {\left (\frac {5 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - \frac {13 \, \sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}} + \frac {3 \, \sin \left (d x + c\right )^{5}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{5}} + \frac {21 \, \sin \left (d x + c\right )^{7}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{7}}\right )}}{a^{3} - \frac {4 \, a^{3} \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} + \frac {6 \, a^{3} \sin \left (d x + c\right )^{4}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{4}} - \frac {4 \, a^{3} \sin \left (d x + c\right )^{6}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{6}} + \frac {a^{3} \sin \left (d x + c\right )^{8}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{8}}} + \frac {16 \, \arctan \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1}\right )}{a^{3}} - \frac {13 \, \log \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + 1\right )}{a^{3}} + \frac {13 \, \log \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - 1\right )}{a^{3}}}{8 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 3.63, size = 97, normalized size = 0.98 \begin {gather*} \frac {16 \, d x \cos \left (d x + c\right )^{4} - 13 \, \cos \left (d x + c\right )^{4} \log \left (\sin \left (d x + c\right ) + 1\right ) + 13 \, \cos \left (d x + c\right )^{4} \log \left (-\sin \left (d x + c\right ) + 1\right ) + 2 \, {\left (11 \, \cos \left (d x + c\right )^{2} - 8 \, \cos \left (d x + c\right ) + 2\right )} \sin \left (d x + c\right )}{16 \, a^{3} d \cos \left (d x + c\right )^{4}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \frac {\int \frac {\tan ^{8}{\left (c + d x \right )}}{\sec ^{3}{\left (c + d x \right )} + 3 \sec ^{2}{\left (c + d x \right )} + 3 \sec {\left (c + d x \right )} + 1}\, dx}{a^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 4.90, size = 123, normalized size = 1.24 \begin {gather*} \frac {\frac {8 \, {\left (d x + c\right )}}{a^{3}} - \frac {13 \, \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1 \right |}\right )}{a^{3}} + \frac {13 \, \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1 \right |}\right )}{a^{3}} + \frac {2 \, {\left (21 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} + 3 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 13 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 5 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1\right )}^{4} a^{3}}}{8 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 1.93, size = 148, normalized size = 1.49 \begin {gather*} \frac {x}{a^3}-\frac {13\,\mathrm {atanh}\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{4\,a^3\,d}+\frac {\frac {21\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7}{4}+\frac {3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5}{4}-\frac {13\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3}{4}+\frac {5\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{4}}{d\,\left (a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8-4\,a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6+6\,a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4-4\,a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+a^3\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________